/* Check JER_Bitmatrix::Invertible(). */
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include "reed_sol-2.h"
#include "jerasure-2.h"
#include "galois-2.h"

using namespace std;

int main( int argc, char** argv )
{
	JER_Bitmatrix *jbm;
	JER_Matrix *jm2;
	int i, j;

	int m = atoi( argv[1] );
	int k = atoi( argv[2] );
	int w = atoi( argv[3] );

	srand48(m);
	jbm = new JER_Bitmatrix( k, k, w );
	for( i = 0; i < k*w; i++ )
		for( j = 0; j < k*w; j++ )
			jbm->Set( i, j, lrand48() % 2 );
	if( jbm->Invertible() )
		fprintf( stdout, "This matrix is invertible\n" );

	return 0;
}
